﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Listuser.aspx.cs" Inherits="PHTShop.admin.Listuser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <asp:ListView ID="lsv" runat="server" OnSelectedIndexChanged="lsv_SelectedIndexChanged"
        OnSelectedIndexChanging="lsv_SelectedIndexChanging" 
            onpagepropertieschanging="lsv_PagePropertiesChanging">
        <LayoutTemplate>

                       <table cellspacing="0" id="postList" class="listTable">
                <!-- Thead -->
                <thead>
                    <tr>                        
                        <th class="header">
                            <a title="Post" href="#">User name</a>
                        </th>
                          <th class="header">
                            <a title="Post" href="#">Full name</a>
                        </th>
                        <th class="header">
                            <a title="Post" href="#">Address</a>
                        </th>
                         </th>
                           <th class="header">
                            <a title="Post" href="#"> Phone</a>
                        </th>
                       
                           <th class="header">
                            <a title="Post" href="#"> Active</a>
                        </th>
                       
                        <th class="header">
                            <a title="Author" href="#">Action</a>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                </tbody>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>                   
                <td>
                    <span id="lblUsername">
                        <%# Eval("username") %></span>
                        <asp:HiddenField ID="hdfUserID" runat="server" Value='<%# Eval("id") %>' />
                
                </td>
                <td>
                    <span id="lblFullName">
                        <%# Eval("fullname") %></span>
                </td>
                <td>
                    <span id="lblAddress">
                        <%# Eval("Address") %></span>
                </td>
                <td>
                    <span id="lblPhone">
                        <%# Eval("Phone") %></span>
                </td>
                <td>
                    <asp:CheckBox ID="chxActive" runat="server" Checked='<%#Eval("Active") %>' />
                </td>
                <td>
                    <asp:LinkButton ID="lbtnBills" runat="server" CommandName="Select">Ordered</asp:LinkButton>
                </td>
            </tr>
           
        </ItemTemplate>
    </asp:ListView>
    <%if (lsv.DataSource != null)
      { %>
    <div class="paginate">
            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="lsv" PageSize="10" >
                <Fields>
                    <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowPreviousPageButton="true"
                        ButtonType="Link" ShowNextPageButton="false" ShowLastPageButton="false"  />
                    <asp:NumericPagerField ButtonType="Link" />
                    <asp:NextPreviousPagerField ShowFirstPageButton="false" ButtonType="Link" ShowPreviousPageButton="false"
                        ShowNextPageButton="true" ShowLastPageButton="true" />
                </Fields>
            </asp:DataPager>
        </div>
        <%} %>
    </div>
    </form>
</body>
</html>
